﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AttendanceInfoList.aspx.cs" Inherits="admin_AttendanceInfoList" EnableEventValidation="false"%>
<%@ Import Namespace="TarreOA.TarreOAModels"%>
<%@ Import Namespace="TarreOA.TarreOABLL" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
        <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>

    <style type="text/css">
        <!--
        html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
        scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
        -->
   </style>
</head>
<%
    AttendanceTime attendanceTime = AttendanceTimeManager.showIt(Server.MapPath(@"~/companyFiles/AttendanceTime.xml"));
%>
<body>
    <form id="form1" runat="server">
    <div class="sub_right_top">
  <div class="hdm_header" >
    <div class="tb1_on"><h2 class="h2_icon">考勤查看</h2></div>

    <div class="clear"></div>
  </div>
  <div class="hdm_footer">
    <div style="height:17px;"></div>    

        <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td width="60">
                    <asp:Label ID="lblBeginDate" runat="server" Text="起始日期"></asp:Label></td>
                <td width="200">
                    <asp:TextBox ID="txtBeginDate" runat="server"   CssClass="Wdate" onClick="WdatePicker()"></asp:TextBox></td>
                <td width="60">
                    <asp:Label ID="lblEndDate" runat="server" Text="终止日期"></asp:Label></td>
                <td width="200">
                    <asp:TextBox ID="txtEndDate" runat="server"  CssClass="Wdate" onClick="WdatePicker()"></asp:TextBox></td>
                <td>
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/reach_button.gif" OnClick="ImageButton1_Click" /></td>
            </tr>
        </table>
    <div style="height:5px;"></div>
   
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="Transparent" BorderColor="#77ACD0" HorizontalAlign="Center"
                         BorderWidth="1px" GridLines="Horizontal" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" Width="99%" DataKeyNames="AttendanceInfoId" EmptyDataText="没有找到符合的数据！" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
                        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                        <Columns>
                            <asp:BoundField DataField="AttendanceInfoId" HeaderText="序号">
                                <HeaderStyle CssClass="itemhead" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="签到日期">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)Eval("AttendanceTime")).ToShortDateString() %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Label ID="lblComeAMData" runat="server" Text='<%# Eval("AttendanceComeAM").ToString()==""?"":(((DateTime)Eval("AttendanceComeAM")).ToShortTimeString() + ((DateTime)Eval("AttendanceComeAM") > new DateTime(((DateTime)Eval("AttendanceComeAM")).Year, ((DateTime)Eval("AttendanceComeAM")).Month, ((DateTime)Eval("AttendanceComeAM")).Day,Convert.ToDateTime(attendanceTime.ComeAM).Hour,Convert.ToDateTime(attendanceTime.ComeAM).Minute,0) ? "迟到" : "正常")) %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <asp:Label ID="lblComeAMHead" runat="server"></asp:Label>
                                </HeaderTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Label ID="lblBackAMData" runat="server" Text='<%# Eval("AttendanceBackAM").ToString()==""?"":(((DateTime)Eval("AttendanceBackAM")).ToShortTimeString() + ((DateTime)Eval("AttendanceBackAM") > new DateTime(((DateTime)Eval("AttendanceBackAM")).Year, ((DateTime)Eval("AttendanceBackAM")).Month, ((DateTime)Eval("AttendanceBackAM")).Day,Convert.ToDateTime(attendanceTime.BackAM).Hour,Convert.ToDateTime(attendanceTime.BackAM).Minute,0) ? "正常" : "早退")) %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <asp:Label ID="lblBackAMHead" runat="server"></asp:Label>
                                </HeaderTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Label ID="lblComePMData" runat="server" Text='<%# Eval("AttendanceComePM").ToString()==""?"":(((DateTime)Eval("AttendanceComePM")).ToShortTimeString() + ((DateTime)Eval("AttendanceComePM") > new DateTime(((DateTime)Eval("AttendanceComePM")).Year, ((DateTime)Eval("AttendanceComePM")).Month, ((DateTime)Eval("AttendanceComePM")).Day,Convert.ToDateTime(attendanceTime.ComePM).Hour,Convert.ToDateTime(attendanceTime.ComePM).Minute,0) ? "迟到" : "正常")) %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <asp:Label ID="lblComePMHead" runat="server"></asp:Label>
                                </HeaderTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Label ID="lblBackPMData" runat="server" Text='<%# Eval("AttendanceBackPM").ToString()==""?"":(((DateTime)Eval("AttendanceBackPM")).ToShortTimeString() + ((DateTime)Eval("AttendanceBackPM") > new DateTime(((DateTime)Eval("AttendanceBackPM")).Year, ((DateTime)Eval("AttendanceBackPM")).Month, ((DateTime)Eval("AttendanceBackPM")).Day,Convert.ToDateTime(attendanceTime.BackPM).Hour,Convert.ToDateTime(attendanceTime.BackPM).Minute,0) ? "正常" : "早退")) %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <asp:Label ID="lblBackPMHead" runat="server"></asp:Label>
                                </HeaderTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="详细">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/images/go_view.gif" CommandArgument='<%# Eval("AttendanceInfoId") %>' CommandName="showAttendanceInfo"/>
                                </ItemTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                        </Columns>
                                    <RowStyle BackColor="Transparent" ForeColor="Black" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                                    <PagerStyle BackColor="#E4F1FD" ForeColor="#1E5494" HorizontalAlign="Right" />
                                    <HeaderStyle BackColor="#E4F1FD" Font-Bold="True" ForeColor="#1E5494" BorderColor="#77ACD0" HorizontalAlign="Center"/>
                                    <AlternatingRowStyle BackColor="#E4F1FD" />
                    </asp:GridView>
                     </div>
    </form>
</body>
</html>